package com.bdqn.service;


import com.bdqn.entity.UserWithBLOBs;
import com.bdqn.util.Result;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
*用户业务
* @author jinge
 */

public interface UserService {


    /**
     * 注册的业务层
     * @param user
     * @param repassword
     * @return
     */
    public Result  register(UserWithBLOBs user, String repassword,String captcha,String sysCaptcha);

    public Result<UserWithBLOBs>  checkLogin(UserWithBLOBs user,String captcha,String sysCaptcha);

    /**
     * 修改用户信息
     * @param user
     * @param hobbys
     * @param file
     * @return
     */
    public Result  updateUserInfo(HttpServletRequest request, UserWithBLOBs user, String hobbys[], CommonsMultipartFile file,CommonsMultipartFile bannerFile);


    /**
     * 修改用户头像
     * @param request
     * @param file
     * @return
     */
    public Result  updateUserPhoto(HttpServletRequest request, CommonsMultipartFile file);

    /**
     * 重置密码
     * @param originPass
     * @param pass
     * @param repass
     * @return
     */
    public Result  updatePass(String originPass,String pass,String repass,HttpServletRequest request);

    public UserWithBLOBs getUserByCenterPath(String centerPath);

    public Result userCenter( String centerpath, String pageName, Integer pageIndex ,Integer articeTid,HttpSession session);


}
